home *** CD-ROM | disk | FTP | other *** search
- -- background: 2745 from stack: in
- -- bmap block id: 3260
- -- flags: 0000
- -- background id: 0
- -- name:
-
-
- -- part 2 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=68 top=103 right=121 bottom=213
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Read Me First
- ----- HyperTalk script -----
- on mouseUp
- visual effect scroll down
- go to card "Read Me First"
- end mouseUp
-
-
-
- -- part 3 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=68 top=121 right=140 bottom=213
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Important Information
- ----- HyperTalk script -----
- on mouseUp
- visual effect scroll down
- go card "Important Information"
- end mouseUp
-
-
-
- -- part 4 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=68 top=140 right=158 bottom=213
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Instructions
- ----- HyperTalk script -----
- on mouseUp
- visual effect scroll down
- go card "Instructions"
- end mouseUp
-
-
-
- -- part 5 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=295 top=210 right=227 bottom=436
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Edit Database
- ----- HyperTalk script -----
- on mouseUp
- push card
- answer "Please open the database stack." with "Okay"
- domenu "open stack..."
- get the script of this stack
- if it is not "DATABASE" then
- answer "Sorry, that is not a database stack for this program." with "Okay"
- pop card
- end if
- end mouseUp
-
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=295 top=227 right=246 bottom=436
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Determine Results
- ----- HyperTalk script -----
- on mouseUp
- push card
- answer "Print results after calculation?" with "Cancel" or "Yes"or "No"
- global pRESULTS
- if it is "Yes" then put "Y" into pRESULTS
- if it is not "Cancel" then
- answer "Please open the database stack." with "Okay"
- domenu "open stack..."
- get the script of this stack
- set lockscreen to true
- if it is "DATABASE" then
- repeat for the number of cards
- go next
- put return&return&return&return&return into bkgnd fld "matches"
- end repeat
- repeat with x=1 to the number of cards
- go card x
- put x into y
- getPresentCard
- repeat until y=the number of cards
- add 1 to y
- put "Current person: "&x&" Matching: "&y
- go card y
- calculateResults
- end repeat
- global currentMatches
- go card x
- put currentMatches into bkgnd fld "matches"
- end repeat
- if pRESULTS contains "Y" then
- go first
- repeat for the number of cards
- click at the loc of bkgnd btn "Print"
- click at the loc of bkgnd fld "Results"
- go next
- end repeat
- end if
- end if
- end if
- pop card
- end mouseUp
-
- on getPresentCard
- global currentPerson,currentmatches
- put bkgnd fld "Matches" into currentmatches
- repeat with x=1 to 47
- put "NONE" into item x of currentPerson
- end repeat
- repeat with x=1 to 47
- put bkgnd fld x into item x of currentPerson
- end repeat
- end getPresentCard
-
-
- on calculateResults
- global currentPerson,currentMatches
- put 0 into total
- put 0 into nowHave
- if item 4 of currentPerson <> bkgnd fld "Sex" then
- repeat with x=5 to 47
- if item x of currentPerson is not empty then
- if bkgnd fld x is not empty then
- add 1 to total
- if bkgnd fld x is item x of currentPerson then add 1 to nowHave
- end if
- end if
- end repeat
- repeat with x=1 to 5
- if item 1 of line x of bkgnd fld "Matches" <= 100*(nowHave/total) then
- put ",,"&return before line x of bkgnd fld "matches"
- put 100*(nowHave/total) into item 1 of line x of bkgnd fld "Matches"
- put item 1 of currentPerson into line x of item 2 of bkgnd fld "Matches"
- put item 3 of currentPerson into line x of item 3 of bkgnd fld "Matches"
- if the number of lines in bkgnd fld "Matches" > 5 then delete line 6 of bkgnd fld "matches"
- repeat with y=1 to 5
- if item 1 of line y of currentMatches <= 100*(nowHave/total) then
- put ",,"&return before line y of currentMatches
- put 100*(nowHave/total) into item 1 of line y of currentMatches
- put bkgnd fld 1 into item 2 of line y of currentMatches
- put bkgnd fld 3 into item 3 of line y of currentMatches
- if the number of lines in currentMatches > 5 then delete line 6 of currentMatches
- exit repeat
- end if
- end repeat
- exit repeat
- end if
- end repeat
- end if
- end calculateResults
-
-
-
- -- part 7 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=295 top=246 right=266 bottom=436
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Build New Database
- ----- HyperTalk script -----
- on mouseUp
- visual effect scroll down
- go to bkgnd "Database"
- domenu "New Stack..."
- set the script of this stack to "DATABASE"
- end mouseUp
-
-